<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
DRA Systems: OR-Objects 1.2.4: Class  Dijkstra
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../drasys/or/graph/sp/Connections.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../drasys/or/graph/sp/Iterate.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Dijkstra.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
drasys.or.graph.sp</FONT>
<BR>
Class  Dijkstra</H2>
<PRE>
java.lang.Object
  |
  +--<B>drasys.or.graph.sp.Dijkstra</B>
</PRE>
<HR>
<DL>
<DT>public class <B>Dijkstra</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>

<P>
A single vertex shortest path implementation using Dijkstra's algorithm.
This is an implementation that works well with both sparse and dense graphs but it ignores the connection properties.
This algorithm finds all of the paths between a root vertex and a set of candidate vertices.
This collection of paths forms a tree where the candidates that were reached from the root are leaves of the tree.
The path generation can be constrained by count, length, cost, time and distance.
The constraints all reduce the size of the path tree and can greatly improve performance.
<P><FONT COLOR="#CC0000"><FONT SIZE=+1>References:</FONT></FONT><FONT SIZE=+1></FONT><P><B><A NAME="0262031418"HREF="http://www.amazon.com/exec/obidos/ISBN=0262031418/opsresearchcomA/" TARGET="amazon.com">Introduction to Algorithms</A></B><BR>&nbsp;&nbsp;&nbsp;&nbsp;Thomas H. Cormen, et al / Hardcover / Published 1990<BR><B><A NAME="0471513563"HREF="http://www.amazon.com/exec/obidos/ISBN=0471513563/opsresearchcomA/" TARGET="amazon.com">Graphs : Theory and Algorithms</A></B><BR>&nbsp;&nbsp;&nbsp;&nbsp;K. Thulasiraman, M.N.S. Swamy / Paperback / Published 1992<BR>
<P>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#Dijkstra(drasys.or.graph.GraphI)">Dijkstra</A></B>(<A HREF="../../../../drasys/or/graph/GraphI.html">GraphI</A>&nbsp;graph)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A constructor that sets the target graph.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#Dijkstra(drasys.or.graph.GraphI, drasys.or.cont.PriorityQueueI)">Dijkstra</A></B>(<A HREF="../../../../drasys/or/graph/GraphI.html">GraphI</A>&nbsp;graph,
         <A HREF="../../../../drasys/or/cont/PriorityQueueI.html">PriorityQueueI</A>&nbsp;queue)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A constructor that sets the target graph and the 'PriorityQueueI' used by the algorithm.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#candidates()">candidates</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an Enumeration on the candidate vertices that were reached in the path generation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#generatePathsFrom(java.lang.Object)">generatePathsFrom</A></B>(java.lang.Object&nbsp;rootKey)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates the single source shortest path tree from the root vertex to the candidate vertices.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#generatePathsTo(java.lang.Object)">generatePathsTo</A></B>(java.lang.Object&nbsp;rootKey)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates the single destination shortest path tree from the candidate vertices to the root vertex.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../drasys/or/graph/EdgeValueI.html">EdgeValueI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#getEdgeValue(drasys.or.graph.VertexI)">getEdgeValue</A></B>(<A HREF="../../../../drasys/or/graph/VertexI.html">VertexI</A>&nbsp;candidate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the edge value of the path between this candidate vertex and the root vertex.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../drasys/or/graph/VertexI.html">VertexI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#getNearestCandidate()">getNearestCandidate</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the candidate vertex for the single shortest path generated.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#getPath(drasys.or.graph.VertexI)">getPath</A></B>(<A HREF="../../../../drasys/or/graph/VertexI.html">VertexI</A>&nbsp;candidate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a path Vector containing the elements in the path between the candidate vertex and the root.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#pathElements(drasys.or.graph.VertexI)">pathElements</A></B>(<A HREF="../../../../drasys/or/graph/VertexI.html">VertexI</A>&nbsp;candidate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an Enumeration on the elements in the path from this candidate vertex to the root vertex.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#setCandidate(boolean)">setCandidate</A></B>(boolean&nbsp;isCandidate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the candidate flags for all vertices.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#setCandidate(java.lang.Object, boolean)">setCandidate</A></B>(java.lang.Object&nbsp;key,
             boolean&nbsp;isCandidate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the candidate flag for a specific vertex.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#setListener(drasys.or.graph.sp.SingleVertexListenerI)">setListener</A></B>(<A HREF="../../../../drasys/or/graph/sp/SingleVertexListenerI.html">SingleVertexListenerI</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the listener to receive the shortest path events.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#setMaxCost(double)">setMaxCost</A></B>(double&nbsp;maxCost)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum cost for any path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#setMaxDistance(double)">setMaxDistance</A></B>(double&nbsp;maxDistance)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum distance for any path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#setMaxLength(int)">setMaxLength</A></B>(int&nbsp;maxLength)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum number of edges in any path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#setMaxPaths(int)">setMaxPaths</A></B>(int&nbsp;maxPaths)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum number of paths the the algorithm will generate.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#setMaxTime(double)">setMaxTime</A></B>(double&nbsp;maxTime)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum time for any path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#setProperties(drasys.or.graph.PropertiesI)">setProperties</A></B>(<A HREF="../../../../drasys/or/graph/PropertiesI.html">PropertiesI</A>&nbsp;properties)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the properties object that is used to access vertex and edge properties.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/graph/sp/Dijkstra.html#usesConnectionProperties()">usesConnectionProperties</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns false because this algorithm ignores the connection properties.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Dijkstra(drasys.or.graph.GraphI)"><!-- --></A><H3>
Dijkstra</H3>
<PRE>
public <B>Dijkstra</B>(<A HREF="../../../../drasys/or/graph/GraphI.html">GraphI</A>&nbsp;graph)</PRE>
<DL>
<DD>A constructor that sets the target graph.</DL>
<HR>

<A NAME="Dijkstra(drasys.or.graph.GraphI, drasys.or.cont.PriorityQueueI)"><!-- --></A><H3>
Dijkstra</H3>
<PRE>
public <B>Dijkstra</B>(<A HREF="../../../../drasys/or/graph/GraphI.html">GraphI</A>&nbsp;graph,
                <A HREF="../../../../drasys/or/cont/PriorityQueueI.html">PriorityQueueI</A>&nbsp;queue)</PRE>
<DL>
<DD>A constructor that sets the target graph and the 'PriorityQueueI' used by the algorithm.
The queue's compare function will be set to 'CompareNumberReverse'.</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="usesConnectionProperties()"><!-- --></A><H3>
usesConnectionProperties</H3>
<PRE>
public boolean <B>usesConnectionProperties</B>()</PRE>
<DL>
<DD>Returns false because this algorithm ignores the connection properties.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#usesConnectionProperties()">usesConnectionProperties</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>false</DL>
</DD>
</DL>
<HR>

<A NAME="setListener(drasys.or.graph.sp.SingleVertexListenerI)"><!-- --></A><H3>
setListener</H3>
<PRE>
public void <B>setListener</B>(<A HREF="../../../../drasys/or/graph/sp/SingleVertexListenerI.html">SingleVertexListenerI</A>&nbsp;listener)</PRE>
<DL>
<DD>Sets the listener to receive the shortest path events.
Passing a null argument disables events.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#setListener(drasys.or.graph.sp.SingleVertexListenerI)">setListener</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="setProperties(drasys.or.graph.PropertiesI)"><!-- --></A><H3>
setProperties</H3>
<PRE>
public void <B>setProperties</B>(<A HREF="../../../../drasys/or/graph/PropertiesI.html">PropertiesI</A>&nbsp;properties)</PRE>
<DL>
<DD>Sets the properties object that is used to access vertex and edge properties.
If the argument is null, the algorithm behaves like it is using 'PropertiesAdapter'.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#setProperties(drasys.or.graph.PropertiesI)">setProperties</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="setMaxPaths(int)"><!-- --></A><H3>
setMaxPaths</H3>
<PRE>
public void <B>setMaxPaths</B>(int&nbsp;maxPaths)</PRE>
<DL>
<DD>Sets the maximum number of paths the the algorithm will generate.
The paths generated will be the 'maxPaths' shortest paths.
The default is Integer.MAX_VALUE.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#setMaxPaths(int)">setMaxPaths</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="setMaxLength(int)"><!-- --></A><H3>
setMaxLength</H3>
<PRE>
public void <B>setMaxLength</B>(int&nbsp;maxLength)</PRE>
<DL>
<DD>Sets the maximum number of edges in any path.
The length of no path will be greater than this value.
The default is Integer.MAX_VALUE.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#setMaxLength(int)">setMaxLength</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="setMaxCost(double)"><!-- --></A><H3>
setMaxCost</H3>
<PRE>
public void <B>setMaxCost</B>(double&nbsp;maxCost)</PRE>
<DL>
<DD>Sets the maximum cost for any path.
The cost of no path will be greater than this value.
The default is Double.POSITIVE_INFINITY.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#setMaxCost(double)">setMaxCost</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="setMaxTime(double)"><!-- --></A><H3>
setMaxTime</H3>
<PRE>
public void <B>setMaxTime</B>(double&nbsp;maxTime)</PRE>
<DL>
<DD>Sets the maximum time for any path.
The time of no path will be greater than this value.
The default is Double.POSITIVE_INFINITY.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#setMaxTime(double)">setMaxTime</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="setMaxDistance(double)"><!-- --></A><H3>
setMaxDistance</H3>
<PRE>
public void <B>setMaxDistance</B>(double&nbsp;maxDistance)</PRE>
<DL>
<DD>Sets the maximum distance for any path.
The distance of no path will be greater than this value.
The default is Double.POSITIVE_INFINITY.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#setMaxDistance(double)">setMaxDistance</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="setCandidate(boolean)"><!-- --></A><H3>
setCandidate</H3>
<PRE>
public void <B>setCandidate</B>(boolean&nbsp;isCandidate)</PRE>
<DL>
<DD>Sets the candidate flags for all vertices.
By default no vertices are marked as candidates.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#setCandidate(boolean)">setCandidate</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="setCandidate(java.lang.Object, boolean)"><!-- --></A><H3>
setCandidate</H3>
<PRE>
public void <B>setCandidate</B>(java.lang.Object&nbsp;key,
                         boolean&nbsp;isCandidate)
                  throws <A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A></PRE>
<DL>
<DD>Sets the candidate flag for a specific vertex.
By default no vertices are marked as candidates.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#setCandidate(java.lang.Object, boolean)">setCandidate</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="generatePathsTo(java.lang.Object)"><!-- --></A><H3>
generatePathsTo</H3>
<PRE>
public int <B>generatePathsTo</B>(java.lang.Object&nbsp;rootKey)
                    throws <A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A>,
                           <A HREF="../../../../drasys/or/graph/InvalidPropertyException.html">InvalidPropertyException</A></PRE>
<DL>
<DD>Creates the single destination shortest path tree from the candidate vertices to the root vertex.
The paths will be directed from the candidate vertices to the root vertex.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#generatePathsTo(java.lang.Object)">generatePathsTo</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The number of paths generated.<DT><B>Throws:</B><DD><A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A> - if the root vertex key isn't in the graph.<DD>InvalidAttributeException - if a vertex or edge attrubute is invalid for the algorithm.</DL>
</DD>
</DL>
<HR>

<A NAME="generatePathsFrom(java.lang.Object)"><!-- --></A><H3>
generatePathsFrom</H3>
<PRE>
public int <B>generatePathsFrom</B>(java.lang.Object&nbsp;rootKey)
                      throws <A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A>,
                             <A HREF="../../../../drasys/or/graph/InvalidPropertyException.html">InvalidPropertyException</A></PRE>
<DL>
<DD>Creates the single source shortest path tree from the root vertex to the candidate vertices.
The paths will be directed from the root vertex to the candidate vertices.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#generatePathsFrom(java.lang.Object)">generatePathsFrom</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The number of paths generated.<DT><B>Throws:</B><DD><A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A> - if the root vertex key isn't in the graph.<DD>InvalidAttributeException - if a vertex or edge attrubute is invalid for the algorithm.</DL>
</DD>
</DL>
<HR>

<A NAME="getNearestCandidate()"><!-- --></A><H3>
getNearestCandidate</H3>
<PRE>
public <A HREF="../../../../drasys/or/graph/VertexI.html">VertexI</A> <B>getNearestCandidate</B>()</PRE>
<DL>
<DD>Returns the candidate vertex for the single shortest path generated.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#getNearestCandidate()">getNearestCandidate</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Null if no paths were found.</DL>
</DD>
</DL>
<HR>

<A NAME="candidates()"><!-- --></A><H3>
candidates</H3>
<PRE>
public java.util.Enumeration <B>candidates</B>()</PRE>
<DL>
<DD>Creates an Enumeration on the candidate vertices that were reached in the path generation.
The candidates are returned in order of the nearest first.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#candidates()">candidates</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
</DL>
<HR>

<A NAME="pathElements(drasys.or.graph.VertexI)"><!-- --></A><H3>
pathElements</H3>
<PRE>
public java.util.Enumeration <B>pathElements</B>(<A HREF="../../../../drasys/or/graph/VertexI.html">VertexI</A>&nbsp;candidate)
                                   throws <A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A></PRE>
<DL>
<DD>Creates an Enumeration on the elements in the path from this candidate vertex to the root vertex.
The enumeration returns all the edges and the vertices in alternating order starting and ending with a vertex.
The edges are returned in order starting from the candidate vertex and ending at the root vertex.
Note that this is the most efficient way to sequence through a path.
The elements are returned in reverse path order if the root vertex is the source vertex.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#pathElements(drasys.or.graph.VertexI)">pathElements</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A> - if the candidate vertex is not in the solution.<DD><A HREF="../../../../drasys/or/graph/GraphError.html">GraphError</A> - if the candidate is not owned by the graph.</DL>
</DD>
</DL>
<HR>

<A NAME="getPath(drasys.or.graph.VertexI)"><!-- --></A><H3>
getPath</H3>
<PRE>
public java.util.Vector <B>getPath</B>(<A HREF="../../../../drasys/or/graph/VertexI.html">VertexI</A>&nbsp;candidate)
                         throws <A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A></PRE>
<DL>
<DD>Creates a path Vector containing the elements in the path between the candidate vertex and the root.
The vector contains all the edges and the vertices in alternating order starting and ending with a vertex.
The elements will always be arranged in the order of forward path traversal.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#getPath(drasys.or.graph.VertexI)">getPath</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A> - if the candidate vertex is not in the solution.<DD><A HREF="../../../../drasys/or/graph/GraphError.html">GraphError</A> - if the candidate is not owned by the graph.</DL>
</DD>
</DL>
<HR>

<A NAME="getEdgeValue(drasys.or.graph.VertexI)"><!-- --></A><H3>
getEdgeValue</H3>
<PRE>
public <A HREF="../../../../drasys/or/graph/EdgeValueI.html">EdgeValueI</A> <B>getEdgeValue</B>(<A HREF="../../../../drasys/or/graph/VertexI.html">VertexI</A>&nbsp;candidate)
                        throws <A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A></PRE>
<DL>
<DD>Gets the edge value of the path between this candidate vertex and the root vertex.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html#getEdgeValue(drasys.or.graph.VertexI)">getEdgeValue</A> in interface <A HREF="../../../../drasys/or/graph/sp/SingleVertexI.html">SingleVertexI</A></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>'null' if no path was found.<DT><B>Throws:</B><DD><A HREF="../../../../drasys/or/graph/VertexNotFoundException.html">VertexNotFoundException</A> - if the vertex is not in the solution.<DD><A HREF="../../../../drasys/or/graph/GraphError.html">GraphError</A> - if the candidate is not owned by the graph.</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD>toString in class java.lang.Object</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../drasys/or/graph/sp/Connections.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../drasys/or/graph/sp/Iterate.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Dijkstra.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright(C)1997-2000 by DRA Systems all rights reserved. <A HREF=http://OpsResearch.com TARGET=HOME>OpsResearch.com</A>
</BODY>
</HTML>
